<?php
/**
 * Created by PhpStorm.
 * User: 徐嘉宾
 * Date: 2016/8/11
 * Time: 9:42
 */
$this->registerCssFile('@web/css/backstage.css',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/uediter/ueditor.config.js',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/uediter/ueditor.all.min.js',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/uediter/ueditor.js',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/js/getreadtype1.js',['depends'=>['app\assets\AppAsset']]);
use yii\helpers\Url;
use yii\widgets\LinkPager;
// var_dump($admininfo);die;
$content = str_replace('"',"'",$info->content);
$content = str_replace("\n", "", $content);
$content = str_replace("\r", "", $content);
?>
<script>
        var a = <?= $info->class1_id ?>;
        var b = <?= $info->class2_id ?>;
        var c = <?= $info->passage ?>;
        var d = <?= $info->diff ?>;
        var g = "<?= $content ?>";
        var h = "<?= $info->id ?>";
</script>
<div class="main">
    <!--右侧内容-->
    <div class="cont">
        <div class="title">题目概况</div>
        <div class="details">
            <div class="details_operation clearfix">
                <div class="bui_select">
                    <input type="button" value="添&nbsp;&nbsp;加" class="add">
                </div>
                <div class="fr">
                    <div class="text">
                        <span>日期：</span>
                        <div class="bui_select">
                            <select name="" id="" class="select">
                                <option value="1"><?= date("Y-m-d "); ?></option>
                            </select>
                        </div>
                    </div>
                    <div class="text">
                        <span></span>
                        <div class="bui_select">
                            <select name="" id="" class="select">
                                <option value="1">Knowledge is power.</option>
                            </select>
                        </div>
                    </div>
                    <div class="text">
                        <span></span>
<!--                        <input type="text" value="" class="search">-->
                    </div>
                </div>
            </div>
            <form action="./?r=admin/contentupdate&id=<?= $info->id ?>" method="post" id="read_form">
                <table class="table" cellspacing="0" cellpadding="0">
                    <thead>
                    <tr>
                        <th width="20%">属性</th>
                        <th>内容</th>
                    </tr>
                    </thead>
                    <tbody>


                    <tr>
                        <td>题目名称</td>
                        <td><input name="title" type="text" placeholder="题目名称" value="<?= $info->title ?>"></td>
                    </tr>
                    <tr>
                        <td>题目简介</td>
                        <td><input name="info" type="text" placeholder="题目简介" value="<?= $info -> info ?>"></td>
                    </tr>
                    <tr>
                        <td>题目一级分类</td>
                        <td>
                            <select name="class1" id="class1">
                                <option value="">请选择</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>题目二级分类、文章编号</td>
                        <td>
                            <select name="class2" id="class2">
                                <option value="">请选择</option>
                            </select>
                            <input name="class_num" type="text" placeholder="文章编号（注意填写）" value="<?= $info->class_num ?>">
                        </td>
                    </tr>
                    <tr>
                        <td>Passage编号</td>
                        <td>
                            <select name="passage" id="passage">
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>题目难度</td>
                        <td>
                            <select name="diff" id="diff">
                                <option value="1">简单</option>
                                <option value="2">一般</option>
                                <option value="3">高</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>题目图片url</td>
                        <td id="imgcon">
                            <input name="img_url" type="text" id="img_url" value="<?= $info->img_url ?>">
                            <a id="img" href="javascript:;" onClick="window.open('./?r=upload/qiniu&class=read_content-img_url-<?= $info->id ?>','','width=600,height=500,left=10, top=10,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;">重新上传图片</a>
                        </td>
                    </tr>
                    <tr>
                        <td>题目原文</td>
                        <td><script id="editor" type="text/plain" style="width:1024px;height:500px;"></script></td>
                    </tr>
                    <tr>
                        <td colspan="2" style="text-align: center"><input type="submit" class="btn" id="submit" onclick="abc()"><input type="reset" class="btn"></td>
                    </tr>

                    </tbody>
                </table>
                <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
                <input name="type" value="1" type="hidden">
            </form>
        </div>
    </div>
</div>